
#include "globals.h"

#include <GL/glew.h>
#include <vector>

#include "../GLRenderer.h"
#include "../GLMesh.h"
#include "../Entities.h"

class Camera;
class Program;

/*
typedef struct RenderState{
	Camera* current_cam;
	Program* current_program;
	int binded_textures[16];
	bool wireframe_mode;
	RenderState() : current_cam( NULL ), wireframe_mode(false) {
		for( int i = 0 ; i < 16; i++ )
		{
			binded_textures[i] = -1;
		}
	}
}RenderState;
*/

//RenderState g_render_state;

ViewerState g_render_state;


double	g_cur_time,
		g_delta_time,
		g_prev_time,
		g_time_acc = 0;


std::vector<unsigned char> g_pressed_keys;

std::vector<GLStaticMesh> g_static_meshes;

std::vector<std::unique_ptr<BaseEntity>> g_entities;

/*
GLfloat gProjectionMatrix[16];
GLfloat gMVPMatrix[16];
GLfloat gModelViewMatrix[16];

GLint max_tex_units;
GLuint* textureID;
GLuint* active_tex_units;

GLuint final_texture;

GLuint color_texture;
GLuint depth_texture;
GLuint fbo;
GLuint depth_bo;

GLuint prim_var_fbo;
GLuint positions_texture;
GLuint normals_texture;




GLuint gProgram;

GLuint gvPositionHandle;
GLuint gvTexCoordHandle;
GLuint gvNormalHandle;
GLuint gvSamplerHandle;
GLuint gvCorTexSamplerHandle;

GLuint gvLightPosHandle;

GLuint gvMVPMartrixHandle;
GLuint gvMVMartrixHandle;



GLuint gScreenProgram;

GLuint gvSPPositionHandle;
GLuint gvSPTexCoordHandle;

GLuint gvSPSamplerHandle;



GLuint gPrimVarProgram;

GLuint gvPVPPositionHandle;
GLuint gvPVPTexCoordHandle;
GLuint gvPVPNormalHandle;

*/
